
{***********************************************************}
{                                                           }
{      Informix esql "sqlca.h"                              }
{                                                           }
{      Translated to Object Pascal by                       }
{      Copyright (c) 2001-2008 Luxena Software Company      }
{      http://www.luxena.com                                }
{      e-mail: support@luxena.com                           }
{                                                           }
{***********************************************************}

unit IfxSqlca;

{$I lx.inc}

{$IFDEF VER140_OR_ABOVE}
  {$ALIGN 8}
{$ENDIF}

interface

uses
  IfxTypes;


const
  SQLNOTFOUND = 100;


type

{$IFNDEF _FGL_}
  sqlcaw_s = record
    sqlwarn0: Char; // = W if any of sqlwarn[1-7] = W
    sqlwarn1: Char; // = W if any truncation occurred or database has transactions or no privileges revoked
    sqlwarn2: Char; // = W if a null value returned or ANSI database
    sqlwarn3: Char; // = W if no. in select list != no. in into list or turbo backend or no privileges granted
    sqlwarn4: Char; // = W if no where clause on prepared update, delete or incompatible float format
    sqlwarn5: Char; // = W if non-ANSI statement
    sqlwarn6: Char; // = W if server is in data replication secondary mode
    sqlwarn7: Char; // = W if database locale is different from proc_locale
  end;
{$ENDIF}

  sqlca_s = record
    sqlcode: int4;
    sqlerrm: array[0..71] of Char; // error message parameters
    sqlerrp: array[0..7] of Char;
    sqlerrd: array[0..5] of int4;
    // 0 - estimated number of rows returned
    // 1 - serial value after insert or ISAM error code
    // 2 - number of rows processed
    // 3 - estimated cost
    // 4 - offset of the error into the SQL statement
    // 5 - rowid after insert

{$IFDEF _FGL_}
    sqlawarn: array[0..7] of Char;
{$ELSE}
    sqlwarn: sqlcaw_s;
{$ENDIF}
  end;
  PIfx_sqlca = ^TIfx_sqlca;
  TIfx_sqlca = sqlca_s;

implementation

end.